﻿@model IEnumerable<LandManager.Web.Models.LandInfo>

@{
    ViewBag.Title = "Index";
    var tableId = ViewBag.Table ?? "addland";
}
<script type="text/javascript">
    $(function () {
        $('#@tableId').hide();
    });
</script>
<style type="text/css">
    .divSty {
        padding: 25px 15px 5px 15px;
        font-family: 'Microsoft YaHei';
    }

    .tbSty {
        width: 100%;
        table-layout: fixed;
        border: solid #9D9D9D;
        border-width: 1px 0px 0px 1px;
    }

    .tdSty {
        word-wrap: break-word;
        text-align: center;
        vertical-align: middle;
        border: solid #9D9D9D;
        border-width: 0px 1px 1px 0px;
        font-size: 0.8em;
    }

    .tdheaderSty {
        text-align: center;
        vertical-align: middle;
        border: solid #9D9D9D;
        border-width: 0px 1px 1px 0px;
        font-size: 0.9em;
        height: 35px;
    }

    .headerSty {
        word-wrap: break-word;
        text-align: center;
        vertical-align: middle;
        background-color: #2573c7;
        color: #FFFFFF;
    }

    .selectSty {
        height: 26px;
        width: 210px;
    }

    .textStyle {
        height: 20px;
        width: 190px;
    }

    .texttdSty {
        padding-right: 15px;
    }

    .btnSty {
        width: 120px;
        height: 20px;
        vertical-align: central;
        /*margin: auto 10px auto 10px;*/
        text-align: center;
        vertical-align: central;
        text-align: center;
        border: 1px solid #ccc;
        border-radius: 2px;
        background: #DADADA;
        color: #000;
        cursor: auto;
        display: inline-block;
        text-decoration: none;
    }

    .aSty {
        width: 100px;
        height: 32px;
        line-height: 32px;
        vertical-align: central;
        margin: auto auto auto 10px;
        text-align: center;
        vertical-align: central;
        text-align: center;
        background: #2573c7;
        color: #fff;
        border: 0px;
        cursor: pointer;
        display: inline-block;
        text-decoration: none;
    }
</style>

@if (Model == null)
{
    <label>当前土地资源为空，请先录入土地资源。@Html.ActionLink("录入土地资源", "Create") </label>
    return;
}
<p>
    @Html.ActionLink("录入土地资源", "Create", null, new { @class = "aSty", title = "录入土地资源" })
</p>
<div class="divSty">
    <a href="~/Land/Index/?handle=0" class="btnSty">新增资源列表</a>
    <a href="~/Land/Index/?handle=1" class="btnSty">已处置资源列表</a>
    <table id="addland" class="tbSty" cellspacing="0">
        <tr class="headerSty">
            <td colspan="10" class="tdheaderSty">新增土地资源列表</td>
        </tr>
        <tr class="headerSty">
            <td class="tdheaderSty" style="width: 10%">宗地编号</td>
            <td class="tdheaderSty" style="width: 5%">土地面积</td>
            <td class="tdheaderSty" style="width: 5%">土地使用人</td>
            <td class="tdheaderSty" style="width: 5%">所属二级单位</td>
            <td class="tdheaderSty" style="width: 5%">是否为上市公司资产</td>
            <td class="tdheaderSty" style="width: 5%">取得时间</td>
            <td class="tdheaderSty" style="width: 5%">宗地位置</td>
            <td class="tdheaderSty" style="width: 5%">是否出租</td>
            <td class="tdheaderSty" style="width: 5%">是否抵押/担保</td>
            <td class="tdheaderSty" style="width: 5%">操作</td>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td class="tdSty">@item.ZDBH</td>
                <td class="tdSty">@item.land_area</td>
                <td class="tdSty">@item.land_user</td>
                <td class="tdSty">@( item.Agency != null ? item.Agency.agency_name : "")</td>
                <td class="tdSty">
                    @if (item.land_Is_IPO == 1)
                    {
                        <label>是</label>
                    }
                    else
                    {
                        <label>否</label>
                    }
                </td>
                <td class="tdSty">@Convert.ToDateTime(item.land_ownDate).ToString("yyyy-MM-dd ")</td>
                <td class="tdSty">@item.land_location</td>
                <td class="tdSty">@item.land_Is_rent</td>
                <td class="tdSty">@item.land_Is_mortgage</td>
                <td class="tdSty">@Html.ActionLink("修改", "Edit", new { id = item.ZDBH }) | @Html.ActionLink("处置", "Handle", new { id = item.ZDBH })</td>
            </tr>
        }
    </table>

    <table id="handleland" class="tbSty" cellspacing="0">
        <tr class="headerSty">
            <td colspan="9" class="tdheaderSty">已处置土地资源列表</td>
        </tr>
        <tr class="headerSty">
            <td class="tdheaderSty" style="width: 10%">宗地编号</td>
            <td class="tdheaderSty" style="width: 5%">土地面积</td>
            <td class="tdheaderSty" style="width: 5%">土地使用人</td>
            <td class="tdheaderSty" style="width: 5%">所属二级单位</td>
            <td class="tdheaderSty" style="width: 5%">是否为上市公司资产</td>
            <td class="tdheaderSty" style="width: 5%">取得时间</td>
            <td class="tdheaderSty" style="width: 5%">宗地位置</td>
            <td class="tdheaderSty" style="width: 5%">是否出租</td>
            <td class="tdheaderSty" style="width: 5%">是否抵押/担保</td>
            @*<td class="tdheaderSty" style="width: 5%">操作</td>*@
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td class="tdSty">@item.ZDBH</td>
                <td class="tdSty">@item.land_area</td>
                <td class="tdSty">@item.land_user</td>
                <td class="tdSty">@( item.Agency != null ? item.Agency.agency_name : "")</td>
                <td class="tdSty">
                    @if (item.land_Is_IPO == 1)
                    {
                        <label>是</label>
                    }
                    else
                    {
                        <label>否</label>
                    }
                </td>
                <td class="tdSty">@Convert.ToDateTime(item.land_ownDate).ToString("yyyy-MM-dd ")</td>
                <td class="tdSty">@item.land_location</td>
                <td class="tdSty">@item.land_Is_rent</td>
                <td class="tdSty">@item.land_Is_mortgage</td>
                @*<td class="tdSty">@Html.ActionLink("修改", "Edit", new { id = item.ZDBH }) | @Html.ActionLink("处置", "Handle", new { id = item.ZDBH })</td>*@
            </tr>
        }
    </table>
</div>
